import { Entity, Columns, Id, ColumnType, Convert } from '@ohos/dataorm';

@Entity('Label')
export class Label {
  @Id({ isPrimaryKey: true ,autoincrement:true})
  @Columns({ columnName: 'id', types: ColumnType.num })
  id: number

  @Columns({ columnName: 'value', types: ColumnType.str })
  value: string

  constructor(value?: string, id?:number) {
    this.id = id
    this.value = value
  }

  toString():string {
    return this.value;
  }
}